/*
 * glRefraction.h
 *
 *  Created on: 21.11.2012
 *      Author: Travis
 */

#pragma once

#include <GLee.h>

#include "GL/gl.h"
#include "GL/glu.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform.hpp>
#include <iostream>
#include "../Water.h"
#include "../engine/engineSettings.h"

class glRefraction
{
public:
	glRefraction(Water *_water);
	virtual ~glRefraction();

	// starting render to texture
	void glRefractionBegin();

	// end of texture render, return texture ID
	GLuint glRefractionEnd();

private:
	Water *water;

	// ID of texture
	GLuint RefTexture;

	// ID of frame buffer and depth buffer
	GLuint FramebufferName, depthrenderbuffer;
};
